//
//  JQFXHLoanApplicationnnResponse.swift
//  YunDouLoans
//
//  Created by 卢小艳 on 2025/7/1.
//

import Foundation



// MARK: - JQFXHAgreeqqment
struct JQFXHAgreeqqment: Codable {
    let name: String
    let code: String
}

// MARK: - JQFXHProductppInfo
struct JQFXHProductppInfo: Codable {
    let handleMode: String?
    let rateFormat: String
    let logo: String
    let amountTips: String
    let wechatGzh: String?
    let rateTips: String?
    let productTips: String
    let wechatGzhQrcode: String?
    let name: String
    let operatingEntity: String
    let amountFormat: String
    let contactMode: String?
    let href: String
    let id: Int
    let timeTips: String
    let timeFormat: String
    
    enum CodingKeys: String, CodingKey {
        case name
        case handleMode = "handle_mode"
        case rateFormat = "rate_format"
        case logo
        case operatingEntity = "operating_entity"
        case amountFormat = "amount_format"
        case contactMode = "contact_mode"
        case amountTips = "amount_tips"
        case wechatGzh = "wechat_gzh"
        case rateTips = "rate_tips"
        case productTips = "product_tips"
        case wechatGzhQrcode = "wechat_gzh_qrcode"
        case href
        case id
        case timeTips = "time_tips"
        case timeFormat = "time_format"
    }
}



struct JQFXHProtocolInfoooData: Codable {
    let name: String
    let handle_id: Int
    let content: String
       
}

struct JQFXHLoanApplicationnnResponse: Codable {
    let ddqbTips: String
    let orderSn: String
    let isNew: Int
    let appId: Int
    let passState: Int
    let state: Int
    let skipUrl: String?
    let todayChannelFormNumber: Int
    let projectId: Int
    let matchInfo: JQFXHMatchrrInfo
    let accessToken: String
    let isCallback: Int
    let flowState: Int
    let message: String
    let formId: String
    
    enum CodingKeys: String, CodingKey {
        case ddqbTips = "ddqb_tips"
        case orderSn = "order_sn"
        case isNew = "is_new"
        case appId = "app_id"
        case passState = "pass_state"
        case state
        case skipUrl = "skip_url"
        case todayChannelFormNumber = "today_channel_form_number"
        case projectId = "project_id"
        case matchInfo = "match_info"
        case accessToken = "access_token"
        case isCallback = "is_callback"
        case flowState = "flow_state"
        case message
        case formId = "form_id"
    }
}

// MARK: - JQFXHMatchrrInfo
struct JQFXHMatchrrInfo: Codable {
    let agreementList: [JQFXHAgreeqqment]
    let productInfo: JQFXHProductppInfo
    let type: Int
    let productId: Int
    let stepId: String
    let state: Int
    let estimateAmount: Int
    let stepNumber: Int
    let productListType: Int
    let assistantKey: String
    let redirectUrl: String?
    let skipType: Int
    
    enum CodingKeys: String, CodingKey {
        case type
        case productId = "product_id"
        case stepId = "step_id"
        case agreementList = "agreement_list"
        case productInfo = "product_info"
        case state
        case estimateAmount = "estimate_amount"
        case skipType = "skip_type"
        case stepNumber = "step_number"
        case productListType = "product_list_type"
        case assistantKey = "assistant_key"
        case redirectUrl = "redirect_url"
    }
}
